<?php
  session_start(); // start up your PHP session!
  $message = false;
  if (isset($_SESSION['message'])&&!empty($_SESSION['message']))
  {
    $message = $_SESSION['message'];
  }  
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>PetCare</title>

<link href="login-box.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>

<script>
        $("#submitbtn").hide();

        $.ajax({
              url: "trainingModeTraining.php",
              type: "POST",
              data: {filename: '<?php echo $_POST['filename']; ?>'},
              cache: false,
              success: function(data){    
                $("#message").html("The training sequence has been saved. Server will begin training data.");
                $("#algorithm").val(data);
                $("#example-placeholder").hide();
                $("#submitbtn").show();
              }});			    
</script>
</head>

<body>


<div style="padding: 100px 0 0 250px;">


<div id="login-box">

<H2>PetCare</H2>
<form action="TrainingModeSubmit.php" method="post">
<p id="message">Please wait while the training mode is running...</p>
<div id="example-placeholder">
  <p><img src="img/progress.gif"/></p>
</div>
<table border="0">
<tr>
  <td><div id="login-box-name">Algorithm:</div></td>
  <td align="center"><div id="login-box-field"><input id="algorithm" class="form-login" type="text" name="algorithm" size="15" maxlength="30" value=""/></div></td>
</tr>
<tr>
  <td colspan="2" id="submitbtn"><input type="image" src="images/logout-btn.png" width="103" height="42" style="margin-left:90px;" value="Enter"/></td>
</tr>
</table>
</form>






</div>

</div>













</body>
</html>
